"Ticket"
from trytond.model import ModelView, ModelSQL, fields


class State(ModelSQL,ModelView):
    _name = "ticket.state"
    name = fields.Char("Name")
    sequence = fields.Integer("Sequence")

State()
"""
class History(ModelSQL,ModelView):
    _name = "ticket.history"
    datetime = fields.DateTime("Date Time")
    writer = fields.Char("Author")
    title = fields.Char("Title")
    owner = fields.Many2One("party.party", "Owner")
    comment = fields.Text("Comment")
    state = fields.Many2One("ticket.state","State")
    assigned_to = fields.Many2One("company.employee", "Assigned To")
"""

class Ticket(ModelSQL,ModelView):
    _name="ticket.ticket"
#    _inherits = {'timesheet.work': 'work'}
#    timesheetwork = fields.Many2One("timesheet.work","Work")
    title = fields.Char("Title", required = True)
    owner = fields.Many2One("party.party", "Owner", required = True)
#   comment
    assigned_to = fields.Many2One("company.employee", "Assigned To", required = True)
    #follow_ups = 
    state = fields.Many2One("ticket.state", "State")
    content = fields.Text("Content")
    #last_update_by

Ticket()
